package com.linxianqin.springbootVue.domain.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>部门表</p>
 * @author lxq
 * @since 2020-12-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysDept对象", description="部门表")
public class SysDeptDTO implements Serializable {

    private static final long serialVersionUID=1L;

      @ApiModelProperty(value = "部门id")
      @JsonSerialize(using= ToStringSerializer.class)
      private Long deptId;

      @ApiModelProperty(value = "父部门id")
      @JsonSerialize(using= ToStringSerializer.class)
      private Long parentId;

      @ApiModelProperty(value = "祖级列表")
      private String ancestors;

      @ApiModelProperty(value = "部门名称")
      private String deptName;

      @ApiModelProperty(value = "显示顺序")
      private Integer orderNum;

      @ApiModelProperty(value = "负责人")
      private String leader;

      @ApiModelProperty(value = "联系电话")
      private String phone;

      @ApiModelProperty(value = "邮箱")
      private String email;

      @ApiModelProperty(value = "部门状态（0正常 1停用）")
      private String status;


      @ApiModelProperty(value = "创建者")
      private String createBy;

      @ApiModelProperty(value = "创建时间")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private Date createTime;

      @ApiModelProperty(value = "更新者")
      private String updateBy;

      @ApiModelProperty(value = "更新时间")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private Date updateTime;

      @ApiModelProperty(value = "子部门")
      private List<SysDeptDTO> children = new ArrayList<>();
}
